layui.define(['jquery','layer','form','element','laydate'], function(exports) {
    var $ = layui.jquery;
    var  layer = layui.layer;
    var form = layui.form();
    var element = layui.element();
    var laydate=layui.laydate;
    var users_info=function(){};

    users_info.prototype.init=function(){
        $.post("/srv/rdo.php?", {tpl:"getDct",name:"民族"}, function (d, e) {
           selectShowDataNoH("#nation",JSON.parse(d),"id","name");
           $("#nation").prepend("<option value=''>选择民族</option>");
           $("#nation").val($("#s_nation").val());
           form.render('select');
        });
        $.post("/srv/rdo.php?", {tpl:"getDct",name:"政治面貌"}, function (d, e) {
           selectShowDataNoH("#political_status",JSON.parse(d),"id","name");
           $("#political_status").prepend("<option value=''>选择政治面貌</option>");
           $("#political_status").val($("#s_political_status").val());
           form.render('select');
        });
        $.post("/srv/rdo.php",{"tpl":"get_dict_list"},function(d){
            var html = "<option value='' childs=''>选择区域</option>"+d;
            $("#areaid").html(html);
            $("#areaid").val($("#s_areaid").val());
            form.render('select');
        }); 
    }

    $("#btn_save").click(function(){
        layer.msg("功能没有实现");
        // document.getElementById("form1").submit();
     });

    var fg=$("#s_sex").val();
    if(fg==1){
        $(":radio[name='sex'][value='1']").prop("checked", "checked");
    }else{
        $(":radio[name='sex'][value='0']").prop("checked", "checked");
    }
    form.render('radio'); 

    var edit_info=new users_info();
    edit_info.init();
    exports('userinfo',edit_info);
});